<template>
    <div>
        <el-dialog :visible.sync="value" fullscreen center>
            <div style="margin-bottom: 5px">
                实际申请： {{user.nickName}}
            </div>
            <div style="margin-bottom: 5px">
                入职时间：{{$YEAR_MONTH_DAY(user.entryTime)}}
            </div>
            <div style="margin-bottom: 5px">
                申请日期：{{$YEAR_MONTH_DAY(new Date())}}
            </div>
            <div style="margin-bottom: 5px">
                所属部门：{{user.departmentNames}}
            </div>
            <div style="margin-bottom: 5px">
                所属职位：{{user.identityName}}
            </div>
            <el-divider content-position="center">以下内容请自评</el-divider>
            <el-form ref="form" :model="data" label-width="80px" label-position="right">
                <el-form-item prop="address" label="工作地点" :rules="[{required:true,message:'必填',trigger:'blur'},{min:2,max:15,message:'2~15字符之间',trigger:'blur'}]">
                    <el-input v-model="data.address" :maxlength="15" show-word-limit></el-input>
                </el-form-item>
                <el-form-item prop="outstandingAchievement" label="业绩描述" :rules="[{required:true,message:'必填',trigger:'blur'},{min:2,max:300,message:'2~300字符之间',trigger:'blur'}]">
                        <el-input v-model="data.outstandingAchievement"type="textarea" :autosize="{ minRows: 5, maxRows: 10}" :maxlength="300" show-word-limit ></el-input>
                </el-form-item>
                <el-form-item prop="technicalAbility" label="态度技能" :rules="[{required:true,message:'必填',trigger:'blur'},{min:2,max:300,message:'2~300字符之间',trigger:'blur'}]">
                    <el-input v-model="data.technicalAbility"type="textarea" :autosize="{ minRows: 5, maxRows: 10}" :maxlength="300" show-word-limit ></el-input>
                </el-form-item>
                <el-form-item prop="ascendancyInsignificance" label="优势不足" :rules="[{required:true,message:'必填',trigger:'blur'},{min:2,max:300,message:'2~300字符之间',trigger:'blur'}]">
                    <el-input v-model="data.ascendancyInsignificance"type="textarea" :autosize="{ minRows: 5, maxRows: 10}" :maxlength="300" show-word-limit ></el-input>
                </el-form-item>
                <el-form-item prop="orientationObjective" label="方向目标" :rules="[{required:true,message:'必填',trigger:'blur'},{min:2,max:300,message:'2~300字符之间',trigger:'blur'}]">
                    <el-input v-model="data.orientationObjective"type="textarea" :autosize="{ minRows: 5, maxRows: 10}" :maxlength="300" show-word-limit ></el-input>
                </el-form-item>
                <el-form-item prop="formalTalkUrl" label="转正报告">
                    请把转正报告PPT另存为pdf进行上传提交,一旦上传,无法更改
                </el-form-item>
                <el-form-item prop="tryAgreementUrl" label="试用合同">
                    试用期合同
                </el-form-item>
            </el-form>

            <template slot="footer">
                <Button type="primary" icon="md-add" @click="handleSubmit" v-loading.fullscreen.lock="fullscreenLoading">提交申请</Button>
            </template>

        </el-dialog>
    </div>
</template>

<script>
    export default {
        name: "each-general-child",
        data(){
            return {
                user:{},
                data:{},
                value:false,
                fullscreenLoading:false
            }
        },
        methods:{
            handleSubmit(){
                this.$refs['form'].validate(valid=>{
                    if(valid){
                        this.$confirm("确定要提交申请吗","温馨提示",{type:'warning'}).then(res=>{

                        });
                    }else{
                        return false;
                    }
                });


            }
        }
    }
</script>

<style scoped>

</style>